home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
K-L
/
LSC HYPER XCMD.cpt
/
XCmd.h
< prev
next >
Wrap
Text File
|
1987-10-30
|
4KB
|
108 lines
/*
HyperXCmd.h Definitions for calling all standard
HyperCard callback routines from C.
©Apple Computer, Inc. 1987
All Rights Reserved.
See CFlash.C for an example of how to include this module in your
C program.
*/
typedef long extended;
typedef struct XCmdBlock {
short paramCount;
Handle params[16];
Handle returnValue;
Boolean passFlag;
ProcPtr entryPoint; /* to call back to HyperCard */
short request;
short result;
long inArgs[8];
long outArgs[4];
} XCmdBlock, *XCmdBlockPtr;
typedef struct Str31 {
char guts[32];
} Str31, *Str31Ptr;
/*result codes */
#define xresSucc 0
#define xresFail 1
#define xresNotImp 2
/* request codes */
#define xreqSendCardMessage 1
#define xreqEvalExpr 2
#define xreqStringLength 3
#define xreqStringMatch 4
#define xreqSendHCMessage 5
#define xreqZeroBytes 6
#define xreqPasToZero 7
#define xreqZeroToPas 8
#define xreqStrToLong 9
#define xreqStrToNum 10
#define xreqStrToBool 11
#define xreqStrToExt 12
#define xreqLongToStr 13
#define xreqNumToStr 14
#define xreqNumToHex 15
#define xreqBoolToStr 16
#define xreqExtToStr 17
#define xreqGetGlobal 18
#define xreqSetGlobal 19
#define xreqGetFieldByName 20
#define xreqGetFieldByNum 21
#define xreqGetFieldByID 22
#define xreqSetFieldByName 23
#define xreqSetFieldByNum 24
#define xreqSetFieldByID 25
#define xreqStringEqual 26
#define xreqReturnToPas 27
#define xreqScanToReturn 28
#define xreqScanToZero 39 /* was suppose to be 29! Oops! */
/* Forward definitions of glue routines. Main program
must include XCmdGlue.inc.c. See XCmdGlue.inc.c for
documentation of each routine. */
typedef void (*MyProcPtr) ();
pascal void SendCardMessage(XCmdBlockPtr,StringPtr msg);
pascal Handle EvalExpr(XCmdBlockPtr paramPtr,StringPtr expr);
pascal long StringLength(XCmdBlockPtr paramPtr,StringPtr strPtr);
pascal Ptr StringMatch(XCmdBlockPtr,StringPtr pattern,StringPtr target);
pascal void ZeroBytes(XCmdBlockPtr,Ptr dstPtr,long longCount);
pascal Handle PasToZero(XCmdBlockPtr,StringPtr pasStr);
pascal void ZeroToPas(XCmdBlockPtr,char *zeroStr,StringPtr pasStr);
pascal long StrToLong(XCmdBlockPtr,Str31 *strPtr);
pascal long StrToNum(XCmdBlockPtr,Str31 *str);
pascal Boolean StrToBool(XCmdBlockPtr,Str31 *str);
pascal void StrToExt(XCmdBlockPtr,Str31 *str,extended *myext);
pascal void LongToStr(XCmdBlockPtr,long posNum,Str31 *mystr);
pascal void NumToStr(XCmdBlockPtr,long num,Str31 *mystr);
pascal void NumToHex(XCmdBlockPtr,long num,short nDigits,Str31 *mystr);
pascal void BoolToStr(XCmdBlockPtr,Boolean,Str31 *);
pascal void ExtToStr(XCmdBlockPtr,extended *,Str31 *);
pascal Handle GetGlobal(XCmdBlockPtr,StringPtr);
pascal void SetGlobal(XCmdBlockPtr,StringPtr globName,Handle globValue);
pascal Handle GetFieldByName(XCmdBlockPtr,Boolean cardFieldFlag,StringPtr);
pascal Handle GetFieldByNum(XCmdBlockPtr,Boolean cardFieldFlag,short);
pascal Handle GetFieldByID(XCmdBlockPtr,Boolean cardFieldFlag,short);
pascal void SetFieldByName(XCmdBlockPtr,Boolean,StringPtr,Handle);
pascal void SetFieldByNum(XCmdBlockPtr,Boolean,short,Handle);
pascal void SetFieldByID(XCmdBlockPtr,Boolean,short,Handle);
pascal Boolean StringEqual(XCmdBlockPtr,Str31 *,Str31 *);
pascal void ReturnToPas(XCmdBlockPtr,Ptr zeroStr,StringPtr pasStr);
pascal void ScanToReturn(XCmdBlockPtr,Ptr *scanHndl);
pascal void ScanToZero(XCmdBlockPtr,Ptr *scanHndl);